package cn.pomit.aliwork.sentinel.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.pomit.aliwork.sentinel.model.ResultModel;
import cn.pomit.aliwork.sentinel.service.IpInfoService;

@RestController
@RequestMapping("/")
public class SentinelRest {
	@Autowired
	IpInfoService ipInfoService;

	@RequestMapping(value = "/ip", method = { RequestMethod.GET })
	public ResultModel welCome() {
		return ipInfoService.getIpInfo();
	}
}
